1. Field of the Invention
The present invention relates to a method and an apparatus suitable for processing of a drawing, a line drawing in a document image, or the like, which generate vector information of a figure from a binary format image stored in order of a raster scanning. In particular, the present invention relates to the method and the apparatus processing for adding line width information at the time of reproduction to the binary format image in which an equal-width line portion and a surface portion are mixed after performing a vectorization process on a core line acquired by performing thinning of the equal-width line portion, and on the other hand, performing the vectorization process on a outline of a surface portion.
2. Description of the Related Art
In recent years, a request for paperless issue increases, and digitizing and reusing existing image data has come to be performed frequently. The reuse of the image data such as a drawing and a line drawing in a document image, conventionally, has been performed in a form where binarization processing of the image data is performed and after that, the image data is converted into vector data using a vectorization technology, and this vector data is used with a CAD software, or the like.
Also in a business document, it is desired to digitize and reuse the existing image data. For example, there is such a reuse configuration as performing a variable magnification also on a difference of partial thickness, or an area, or the like, of each portion of an original picture in a form of reflecting a desired variable magnification ratio (that is, a thick portion within the original picture is relatively thick also all over the drawing after varying magnification and a thin potion within the original picture is relatively fine also all over the drawing after varying the magnification.) Such a reuse configuration can be realized by creating the binary format image of the image within an original document, and by the outline vectorization process which performs the vectorization process of the outline.
With respect to the outline vectorization process of the binary format image, the present inventor has already proposed the technology disclosed in Japanese Patent No. 3026592. The processes in this Japanese Patent No. 3026592 comprise a process step determining a connecting direction of points which compose this outline according to the state of the neighborhood pixels, and a process step judging a connection status of the point composing the outline and the other point composing this outline. A position determined in advance is made to be the point which compose the outline based on a state of a noticed pixel and neighborhood pixels thereof, and the position of the noticed pixel is updated on the image data in order of a raster scanning, and the process steps are performed based on the state of the neighborhood pixels for every noticed pixel and the outline points are extracted.
In the above configuration, the state of the noticed pixel in the image data and the neighborhood pixels thereof is held, and this noticed pixel is taken out in order of the raster scanning, and a horizontal and vertical vector between pixels is detected based on the state of the noticed pixel and the neighborhood pixels thereof. The connection status of these vectors between pixels is discriminated, and proposed is a method that operates so that the outline of the image data may be extracted based on the connection status of this discriminated vector between pixels.
The above-mentioned method has an effect which can lessen a capacity of a memory since all the outlines within the original picture can be extracted by one raster scanning, and the memory for storing all the image data is not needed. The method is a outline extraction method which can give a significant width also to the thin line of 1-pixel width by extracting the outline not at the center position of the pixel but at the edge. It has been disclosed that not only the outline of the 4-combination pixel area in which the pixels in the original picture are combined in the four directions is extracted, but also the 8-combination pixel area in which the pixels in the original picture are combined in the eight directions can also be extracted.
The present inventor has disclosed, in Japanese Patent Laid-Open No. H05-108823 (1993), that an efficient outline point extraction is possible by modularizing the vector extraction rule disclosed in Japanese Patent No. 3026592.
In the case of reusing the existing image data in the business document, there also exists considerably the cases that it is preferred to process lines forming a certain figure as mere a line (a straight line, an open curve, a closed curve, or the like), or an assembly of the lines. The typical utilizing method is an editing operation, for example, such as only a part of lines are deleted out of the assembly of the lines, or another line is added, or a partial alteration of curvature, length, thickness, and line types (a continuous line, a broken line, an alternate long and short dash line, or the like) is added to only a part of these lines. As what replies to such a request, there is a core line vectorization process which vectorizes the core line showing features of the original figure.
In the core line vectorization process, an image processing called thinning is utilized well in order to extract the core line. A thinning process is a process which narrows the line width while maintaining the connecting relation of each part on a binary format image so that the line width may become 1 pixel. Then, the binary format image of the acquired core line with the line width of 1 pixel is vectorized for every independent line and closed curve which connects between two points of those endpoints or intersections. The core line vectorization is based on, for example, a method disclosed in U.S. Patent Application Publication No. 2007/230809.
However, since the information with respect to the thickness of each line within the original image (binary format image before thinning) has been lost from the core line acquired by performing this thinning process, the information with respect to the thickness of the original image has not been reflected to the vector data acquired by vectorizing the binary format image of the core line. Accordingly, the thickness of the line is thinly reproduced in the vector data compared with the original image, and a sense of incongruity has been given to the user.
In the original image of the object to be processed, there are many original images in which the equal-width line portion and the surface portion are mixed, and it may be more preferable that as for the equal-width line portion, the core line vectorization process is performed while the core line is extracted, and as for the surface portion, the outline vectorization process of the outline is performed.
An example of the image in which the equal-width line portion and the surface portion are mixed is illustrated in FIG. 2. Figures such as a circle of which the inside are painted, and the line in which the line width changes in the middle of the process cannot be expressed only by the line to which the line width information is given.
In Japanese Patent Laid-Open No. H06-020040 (1994), first, when the facing outline vectors are within a certain width after detecting the outline of the image and forming the outline vector, the core line vector is made to be formed while the center line of the outline vector is made to be the core line. In the patent, described is the image processing apparatus characterized in that separation of the line part and the surface part is performed by creating a virtual vector combining the outlines of the both sides corresponding to the breakpoint in which the core line vector is not formed.
However, in Japanese Patent Laid-Open No. H06-020040 (1994), the condition whether to form the core line vector is made to be whether the facing outlines are within the certain width. Therefore, the line of which the thickness changes gradually also becomes the equal-width line, or in the image including a thick line, an appearance changes greatly between the original image and a vector reproduced image by the failure in the separation of the equal-width line portion and the surface potion.
In Japanese Patent Laid-Open No. 2004-265384, described is an image processing apparatus characterized in that the center line of the two outlines is vectorized so as to have a width in the case of the outline being close to each other in a certain section after extracting the outline vector of the image, and of the distance among the outlines being a fixed length averagely.
However, in the method disclosed in Japanese Patent Laid-Open No. 2004-265384, there is a problem that the crossing part where both equal-width-lines are connected to each other is not included in any equal-width lines and remains as the surface portion, in the intersection where the equal-width lines are connected to each other. In this case, an editing performance is not good and also the amount of the vector data increases.
Like two prior arts mentioned above, there is a problem that the method in which the equal-width line portion and the surface portion are separated from the vector information of the outline will have needed the process which is high in the computing load, such as the process which calculates a pair of outlines, and the process which calculates the distance among outlines.